#ifndef SETTINGS_VIEW_H
#define SETTINGS_VIEW_H

#include <iostream>

#include <QtWidgets/QMainWindow>
#include <qevent.h>

#include "ui_SettingsArea.h"
#include "SettingsModel.h"

class SettingsView : public QWidget
{
	Q_OBJECT

	friend class Connector;

public:
	SettingsView(QWidget * parent = 0);
	void SetModel(SettingsModel* model);

public slots:
	void displayParameter(const QPointF &);
	void addRow();
	void enableControls();

	/// <summary>
	/// Slot uaktywniajacy elementy do przeprowadzenia fitowania
	/// </summary>
	void enableFitOptions(const bool);

	/// <summary>
	/// Slot resetujacy dane z parametrami fitowania
	/// </summary>
	void resetFitParameters();

signals:
	void fitDataLoaded();

protected:
	 bool eventFilter(QObject *obj, QEvent *event);

private:
	Ui::settingsClass ui;
	SettingsModel* _model;
	QTableWidgetItem * _tableItem;

	int _numberOfPeaks;
	int _currentRow;
	static int filledColumns;
};

#endif